<script lang="ts">
import moment from 'moment'
import Vue from 'vue';
import { Component, Prop } from "vue-property-decorator";

@Component({})
export default class ProfileFilter extends Vue {
    @Prop() keywords: keywordsOf<Profile> = {}
    @Prop() data: Profile[] = []

    _keywords = this.keywords
    filterDrawerVisible = false

    get title() {
        return `${moment(this.keywords.availability?.availableDate).format('YYYY年MM月DD日')}前可入场人员(${this.data.length}人)`
    }

    openFilter = () => {
        this._keywords = { ...this.keywords }
        this.filterDrawerVisible = true
    }
}
</script>
<template>
    <view class="top-header">
        {{ title }}
        <view class="right" @click="openFilter">
            <button>option</button>
        </view>
    </view>
</template>

<style scoped>
.top-header {
    height: 80px;
    color: #3030b1;
    background-color: #bde0ff;
    border-bottom: solid 1px #5ea2f5;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 40px;
}

.top-header .right {
    color: #0c3898;
}

.hero {
    padding: 60px;
    text-align: center;
}

/* el-drawer加滚动条 */
.overflowAuto {
    overflow-y: auto;
    position: absolute;
    width: 100%;
    height: 100%;
}
.overflowAuto::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.overflowAuto::-webkit-scrollbar-thumb {
    background-color: rgb(211, 202, 202);
}

.green {
    background-color: #12ac71;
}

.blue {
    background-color: #3d3db6;
}
.orange {
    background-color: orange;
}
.red {
    background-color: brown;
}
.purple {
    background-color: purple;
}
.pink {
    background-color: palevioletred;
}
.olive {
    background-color: olivedrab;
}
.turquoise {
    background-color: turquoise;
}
.teal {
    background-color: teal;
}
</style>